package com.hong.taotaomall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 地区表
 * </p>
 *
 * @author hong
 * @since 2023-03-25
 */
@Data
public class District implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;


    private String parent;


    @JsonProperty("value")
    private String code;

    @JsonProperty("label")
    private String name;

    @TableField(exist = false)
    private List<District> children = new ArrayList<>();

}
